package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.ruoyi.system.mapper.SysCourseinforMapper;
import com.ruoyi.system.domain.SysCourseinfo;
import com.ruoyi.system.service.ISysCourseInfoService;
import org.springframework.stereotype.Service;

@Service
public class SysCourseInfoServiceImpl implements ISysCourseInfoService {
    @Autowired
    private SysCourseinforMapper sysCourseinforMapper;


    /**
     * 查询VIEW
     *
     * @param name VIEW主键
     * @return VIEW
     */
    @Override
    public SysCourseinfo selectTopicStuInfoByName(String name) {
        return sysCourseinforMapper.selectTopicStuInfoByName(name);
    }

    /**
     * 查询VIEW列表
     *
     * @param topicStuInfo VIEW
     * @return VIEW
     */
    @Override
    public List<SysCourseinfo> selectTopicStuInfoList(SysCourseinfo topicStuInfo) {
        return sysCourseinforMapper.selectTopicStuInfoList(topicStuInfo);
    }

    /**
     * 新增VIEW
     *
     * @param topicStuInfo VIEW
     * @return 结果
     */
    @Override
    public int insertTopicStuInfo(SysCourseinfo topicStuInfo) {
        return sysCourseinforMapper.insertTopicStuInfo(topicStuInfo);
    }

    /**
     * 修改VIEW
     *
     * @param topicStuInfo VIEW
     * @return 结果
     */
    @Override
    public int updateTopicStuInfo(SysCourseinfo topicStuInfo) {
        return sysCourseinforMapper.updateTopicStuInfo(topicStuInfo);
    }

    /**
     * 批量删除VIEW
     *
     * @param names 需要删除的VIEW主键
     * @return 结果
     */
    @Override
    public int deleteTopicStuInfoByNames(String[] names) {
        return sysCourseinforMapper.deleteTopicStuInfoByNames(names);
    }

    /**
     * 删除VIEW信息
     *
     * @param name VIEW主键
     * @return 结果
     */
    @Override
    public int deleteTopicStuInfoByName(String name) {
        return sysCourseinforMapper.deleteTopicStuInfoByName(name);
    }
    @Override
    public int importData(SysCourseinfo sysCourseinfo){
        sysCourseinforMapper.insertCou(sysCourseinfo);
        sysCourseinforMapper.insert_cs(sysCourseinfo);
        return 1;
    }
    @Override
    public int findAn(String id){
        return sysCourseinforMapper.findU(id);
    }
}
